﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using SelfMadeMillionaire.Core;
using SelfMadeMillionaire.Core.Entities;
using SelfMadeMillionaire.Core.Enums;
using SelfMadeMillionaire.Core.Repositories;
using SelfMadeMillionaire.Core.Services;
using SelfMadeMillionaire.Core.Specifications;

namespace SelfMadeMillionaire.BLL.Services
{
	public class PortfolioService : IPortfolioService
	{
		private readonly IPortfolioRepository _portfolioRepository;

		public PortfolioService(IPortfolioRepository PortfolioRepository)
		{
			_portfolioRepository = PortfolioRepository;
		}

        public IEnumerable<Portfolio> GetAll()
        {
            return _portfolioRepository.GetAll();
        }

		public Portfolio Add(Portfolio item)
		{
            return _portfolioRepository.Add(item);
		}

        public Portfolio Update(Portfolio item)
		{
            return _portfolioRepository.Update(item);
		}

		public Portfolio Get(int id)
		{
			return _portfolioRepository.Get(id);
		}
        
		public void Remove(int id)
		{
            _portfolioRepository.Remove(id);
		}
	}
}